package echat.future.cn.echat.my.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import echat.future.cn.echat.R;
import echat.future.cn.echat.my.bean.FansBean;
import echat.future.cn.echat.my.utils.ImageLoadUtils;

/**
 * 我的粉丝
 */
public class FanseListAdapter extends BaseQuickAdapter<FansBean,BaseViewHolder> {
    public FanseListAdapter(@Nullable List<FansBean> data) {
        super(R.layout.item_fanse_list,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FansBean item) {
        ImageLoadUtils.loadImage(mContext,item.getAvatar(),helper.getView(R.id.head));
        helper.setText(R.id.name,item.getUsername())
                .setText(R.id.level,item.getLevel() == null?"LV.0":("LV."+item.getLevel()));
        helper.addOnClickListener(R.id.add);
    }
}
